<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('cascade_list'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>级联数据管理 </title>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="templates/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/common.js"></script>
<script type="text/javascript" src="templates/js/forms.func.js"></script>
</head>
<body class="mainbody">
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
  <a href="home.php" class="home"><i></i><span>首页</span></a>
  <i class="arrow"></i>
  <span>级联数据管理</span>
  <a href="javascript:location.reload();" class="reload">刷新</a>
</div>
<!--/导航栏-->
<!--工具栏-->
<div id="floatHead" class="toolbar-wrap">

</div>
<!--/工具栏-->
<form name="form" id="form" method="post" action="cascade_save.php?action=save">
<div class="table-container">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="ltable ltabletd">
		<tr align="left" class="head">
			<td width="5%" height="36" align="center" >选择</td>
			<td width="5%">ID</td>
			<td width="30%">级联名称</td>
			<td width="30%">级联标识</td>
			<td width="10%" align="center">排序</td>
			<td width="20%" align="center">操作</td>
		</tr>
		<?php
		$dosql->Execute("SELECT * FROM `#@__cascade` ORDER BY orderid ASC, id ASC");
		if($dosql->GetTotalRow() > 0)
		{
			while($row = $dosql->GetArray())
			{
		?>
		<tr align="left">
			<td align="center" ><span class="checkall" style="vertical-align:middle;"><input type="checkbox" name="checkid[]" value="<?php echo $row['id']; ?>,|,<?php echo $row['groupsign']; ?>" /></span></td>
			<td><?php echo $row['id']; ?></td>
			<td><input type="text" name="groupname[]" id="groupname[]" class="input" value="<?php echo $row['groupname']; ?>" />
				<input type="hidden" name="id[]" id="id[]" value="<?php echo $row['id']; ?>" /></td>
			<td><input type="text" name="groupsign[]" id="groupsign[]" class="input" value="<?php echo $row['groupsign']; ?>" /></td>
			<td align="center"><a href="cascade_save.php?id=<?php echo $row['id']; ?>&amp;orderid=<?php echo $row['orderid']; ?>&amp;action=up" class="leftArrow" title="提升排序"></a>
				<input name="orderid[]" type="text" id="orderid[]" class="input small" value="<?php echo $row['orderid']; ?>" />
				<a href="cascade_save.php?id=<?php echo $row['id']; ?>&amp;orderid=<?php echo $row['orderid']; ?>&amp;action=down" class="rightArrow" title="下降排序"></a></td>
			<td align="center"><span><a href="cascadedata.php?sign=<?php echo $row['groupsign'] ?>">查看</a></span> | <span class="nb"><a href="cascade_save.php?action=delclass&amp;sign=<?php echo $row['groupsign'] ?>&amp;id=<?php echo $row['id'] ?>" onclick="return ConfDel(2);">删除</a></span></td>
		</tr>
		<?php
			}
		}
		else
		{
		?>
		<tr align="center">
			<td colspan="6" class="dataEmpty">暂时没有相关的记录</td>
		</tr>
		<?php
		}
		?>
		<tr align="center">
			<td height="36" colspan="6"><strong>新增一个级联组</strong></td>
		</tr>
		<tr align="left" class="dataTrOn">
			<td height="36">&nbsp;</td>
			<td>&nbsp;</td>
			<td><input type="text" name="groupname_add" id="groupname_add" class="input" /></td>
			<td><input type="text" name="groupsign_add" id="groupsign_add" class="input" /></td>
			<td align="center"><input type="text" name="orderid_add" id="orderid_add" class="input small" value="<?php echo GetOrderID('#@__cascade'); ?>" /></td>
			<td>&nbsp;</td>
		</tr>
	  </table>
</div>
<!--/列表-->
  <!--内容底部-->
<div class="line20"></div>
<div class="pagelist">

<div class="l-btns">
   　<span>操作：<a class="all" href="javascript:;" onclick="checkAll(this);"><span>全选</span></a> - <a href="javascript:UpOrderID('cascade_save.php');"><a href="javascript:SubUrlParam('cascade_save.php?action=delallclass');" onclick="return ConfDelAll(2);"> 删除 </a> - <a href="javascript:UpOrderID('cascade_save.php');"> 更新排序 </a></span>
</div><div class="l-btns">
<span>共有<?php echo $dosql->GetTableRow('#@__cascade'); ?>条记录</span>
</div>
<div class="right">

 <a href="javascript:void(0);" onclick="form.submit();return false;" class="btn">更新全部</a>
 </div>
  
</div>
<!--/内容底部-->

  </form>
</body>
</html>